﻿@model IEnumerable<CodeCamp.Models.Email.SiteUserListItem>

<div>

<table style="text-align:left;">
    <tr>
        <th>Actions</th>
        <th>SU Id</th>
        <th>SiteUser Name</th>
        <th>SiteUser Email</th>
        <th>ID Provider</th>
        <th>Presenter</th>
        <th>Insider</th>
        <th>Created</th>
        <th>Last Active</th>
    </tr>
@*
            @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
*@
@foreach (var item in Model) {
    <tr>
        <td>@Html.ActionLink("Add Email", "EmailCampaignAddEmail", new { eventName = item.EventShortName, id = item.AddEmailLinkId })</td>
        <td>@Html.DisplayFor(modelItem => item.SiteUserId)</td>
        <td>@Html.ActionLink(item.SiteUserName, "SiteUserDetail", "EventMgmt", new { eventName = item.EventShortName, id = item.SiteUserId }, null)</td>
        <td style="text-align:right;">@Html.DisplayFor(modelItem => item.SiteUserEmail)</td>
        <td>@Html.DisplayFor(modelItem => item.SiteUserIdentityProvider)</td>
        <td>@Html.DisplayFor(modelItem => item.IsPresenterAtThisCC) 
            @if (item.PresenterId.HasValue)
            {
                @Html.ActionLink(string.Format("PR {0}", item.PresenterId), "Details", "Presenters", new { eventName = item.EventShortName, id = item.PresenterId.Value }, null)
            }
        </td>
        <td>@Html.DisplayFor(modelItem => item.IsInsider)</td>
        <td>@string.Format("{0:yyyy-MM-dd}", item.SiteUserCreatedUTC)</td>
        <td>@string.Format("{0:yyyy-MM-dd}", item.SiteUserLastActivityUTC)</td>
    </tr>
}

</table>
</div>
